<template>
  <!-- <app-base> -->
    <div>
      <article>
        <!-- <route :comp="{name: 'login'}" name="root"></route> -->
          <route :comp="{name: 'load-params', props: {componentName: 'login',dataUrl:'http://61.134.61.238:8002/cr/rs/sql/getParams'}}"></route>
      </article>
      <message-box>
      </message-box>
    </div>
  <!-- </app-base> -->
</template>

<script>
import Vue from 'vue'
export default {
 ready () {
   if(!window.onerror) {
    window.onerror = function (message, file, line, col, error) {
      HostApp.alert("Error occured: " + error.message)
      return false
    }
   }
 }
}
</script>
<style >
.app-bg {
  background: #F5F5F5;
}
.app-input {
  background: #FFF;
  border-bottom: 1px solid #ccc;
}
.app-input input, .app-input label {
  padding: 8px 10px;
  border: none;
  outline: none;
  margin: 0px;
}
.app-btn {
  display: flex;
  width: 100%;
}
.app-btn button{
  flex: 1;
  border-radius: 17px;
  margin: 10px;
}
.app-btn button:focus, .app-btn button::selection {
  outline: none;
}
.app-list {
  margin-top: 8px;
  background: #FFF;
}
.app-list div {
  padding: 6px 10px;
}
.app-list div:first-child{
  border-bottom: 1px solid #ccc;
}
div[contenteditable=true]{
  height: 80px;
  width: 100%;
  outline: none;
  padding: 8px;
  overflow: scroll;
}
/* app卡片样式 */
.app-preview {
  position: relative;
  background-color: #FFF;
  height: auto;
}
.app-preview > .head > * {
  padding: 0px;
  margin: 0px;
}
.app-preview > .head {
  display: flex;
  justify-content: space-between;
  padding: 10px 15px;
  line-height: 2.5em;
  border-bottom: 1px solid #D5D5D6;
}
.app-preview-btn-default {
    color: #999999;
}
.app-preview-btn-success {
    color: #3CC51F;
}
.app-preview > .body {
  padding: 10px 15px;
  border-bottom: 1px solid #D5D5D6;

}
.app-preview > .body > div > label {
  text-align: justify;
  text-align-last: justify;
  min-width: 80px;
}
.app-preview > .foot {
  display: flex;
  height: 50px;
}
.app-preview > .foot > * {
  flex: 1;
  display: block;
  flex: 1;

  text-align: center;
}
.app-preview > .foot > * + * {
  border-left: 1px solid #D5D5D6;
}

/* checkbox和radio的样式 */
.magic-radio,
.magic-checkbox {
  position: absolute;
  display: none;
}

.magic-radio[disabled],
.magic-checkbox[disabled] {
  cursor: not-allowed;
}

.magic-radio + label,
.magic-checkbox + label {
  position: relative;
  display: block;
  padding-left: 30px;
  cursor: pointer;
  vertical-align: middle;
  text-align: left;
}

.magic-radio + label:hover:before,
.magic-checkbox + label:hover:before {
  animation-duration: 0.4s;
  animation-fill-mode: both;
  animation-name: hover-color;
}

.magic-radio + label:before,
.magic-checkbox + label:before {
  position: absolute;
  top: 0;
  left: 0;
  background: #f2f6fc;
  display: inline-block;
  width: 20px;
  height: 20px;
  content: '';
  border: 1px solid #c0c0c0;
}

.magic-radio + label:after,
.magic-checkbox + label:after {
  position: absolute;
  display: none;
  content: '';
}

.magic-radio[disabled] + label,
.magic-checkbox[disabled] + label {
  cursor: not-allowed;
  color: #e4e4e4;
}

.magic-radio[disabled] + label:hover, .magic-radio[disabled] + label:before, .magic-radio[disabled] + label:after,
.magic-checkbox[disabled] + label:hover,
.magic-checkbox[disabled] + label:before,
.magic-checkbox[disabled] + label:after {
  cursor: not-allowed;
}

.magic-radio[disabled] + label:hover:before,
.magic-checkbox[disabled] + label:hover:before {
  border: 1px solid #e4e4e4;
  animation-name: none;
 }

.magic-radio[disabled] + label:before,
.magic-checkbox[disabled] + label:before {
  border-color: #e4e4e4;
}

.magic-radio:checked + label:before,
.magic-checkbox:checked + label:before {
  animation-name: none;
}

.magic-radio:checked + label:after,
.magic-checkbox:checked + label:after {
  display: block;
}

.magic-radio + label:before {
  border-radius: 50%;
}

.magic-radio + label:after {
  top: 4px;
  left: 4px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #98CFEE;
}

.magic-radio:checked + label:before {
  border: 2px solid #98CFEE;
}

.magic-radio:checked[disabled] + label:before {
  border: 2px solid #c9e2f9;
}

/*.magic-radio:checked[disabled] + label:after {
background: #c9e2f9; }*/

.magic-checkbox + label:before {
  border-radius: 3px;
}

.magic-checkbox + label:after {
  top: 2px;
  left: 7px;
  box-sizing: border-box;
  width: 6px;
  height: 12px;
  transform: rotate(45deg);
  border-width: 2px;
  border-style: solid;
  border-color: #fff;
  border-top: 0;
  border-left: 0;
}

.magic-checkbox:checked + label:before {
  border: #98CFEE;
  background: #98CFEE;
}

.magic-checkbox:checked[disabled] + label:before {
  border: #c9e2f9;
  background: #c9e2f9;
}


</style>
